#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
const int N = 20;
int n;
int a[N], f[N];
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		sort(a, a + n);
		memset(f, 0, sizeof(f));
		int cnt = 1;
		for (int i = 1; i < n; i++) {
			if (abs(a[i] - a[i - 1]) <= 2) {
				f[cnt]++;
			}
			else {
				cnt++;
				f[cnt]++;
			}
		}
		if (abs(a[1] - a[0]) > n) {
			f[1] = 1;
		}
		else {
			f[1]++;
		}
		int ma = 0, mi = n + 1;
		for (int i = 1; i <= cnt; i++) {
			ma = max(ma, f[i]);
			mi = min(mi, f[i]);
		}
		cout << mi << " " << ma << endl;
	}
	return 0;
}